home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NOVA - For the NeXT Workstation
/
NOVA - For the NeXT Workstation.iso
/
SourceCode
/
GaugesDemo
/
README
< prev
next >
Wrap
Text File
|
1992-12-19
|
2KB
|
47 lines
This is the begining of a general purpose gauges package.
Revision:
1.0 Made subclass of Control and now supports target action on over/underflow
Added read:/write:/awake methods. (Should work as custom pallate)
0.9 First revision. Gauge class with BarGauge and ValuatorGauge
subclasses. Supports tics, tic labels, and autoscaling.
Design:
There is a general purpose gauge class called "Gauge" that knows how
to do all of the functions of a specific gauge but draw it and refresh
it's background. It has all of the functions to set flags, data and
load values.
The subclasses implement a few messages. They know how to
"restoreBitmap:" and "drawSelf::". The first causes the off screen
bitmap, holding the backgroundof the object, to be redrawn. This is
usually the result of rescaling, resizing or color changes. The second
method mentioned composites the background and then draws the value
marker.
Usage:
Parse the Gauge and whatever subclass you want to use into IB. The
put a custom view in your interface and change the type to the gauge
you want. You can now make it an outlet or do whatever IB stuff you
want.
You will probably want to set some flags, borderType, label state,
number of tic marks, min and max values. This will generate the
background. Also, load up the autoscale parameters. Now start sending
it data and the pointer should track the data.
Demo:
You can hook up sliders to gauges and compile just that. This will
cause the bars to track sliders. Probably would make agood pallate.
Working Gauges:
Bar Gauge
Valuator Gauge
NonWorking Gauges:
Dial
<joe>